home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / util / stdm15.zip / README.TXT < prev    next >
Text File  |  1994-12-16  |  32KB  |  944 lines

  1.  
  2.             Stdemo Player 1.5 
  3.     Copyright (c) 1992-1994 Mik Kvitchko
  4.  
  5. -------------------------------
  6. | Mik Kvitchko                |
  7. | 37 Landsdowne Rd,           |
  8. | East Brunswick, NJ 08816    |
  9. | USA                         |
  10. |Internet:    mik@cnj.digex.com |
  11. |CompuServe: [74127,3671]     |
  12. -------------------------------
  13.  
  14. This package consists of the following files:
  15.  
  16. ADDON.TXT    - Description of the add-on to StDemo Player
  17. HIST.TXT    - History of changes
  18. README.TXT    - This File
  19. SCRIPT.TXT    - Stdemo Player example script
  20. STDEMO.DIZ    - Stdemo Player short description.
  21. STDEMO.EXE    - Stdemo Player program
  22. STHOOK.DLL    - Stdemo Player DLL
  23.  
  24. What is this?
  25. =============
  26.  
  27. Stdemo Player is the multy-purpose application. First of all, you can 
  28. use it to create demos and tutorials. It allows you to write a script, 
  29. which will start one or several Windows application and perform a series 
  30. of keystrokes or mouse actions aimed to demonstrate these applications.
  31.  
  32. While your script is being "played", you can disable completely keyboard 
  33. and mouse, so that user will not be able to interfere with the running 
  34. demo and to cause a conflict. At certain points of you script you may 
  35. interrupt it in order to interact with user. These interactions allow:
  36.  
  37. -    to show the "text" box with some explanatory text before script 
  38.     will continue ( this is the main idea of how demos and tutorials 
  39.     are to be designed);
  40.  
  41. -    to show the "menu" box where user can select one of several 
  42.     choices, and therefore control the script's execution;
  43.  
  44. -    to show the "input" box, where user can answer questions and 
  45.     enter some text, which later can be used in script.
  46.  
  47. There are many varieties of these boxes in order to make your demo 
  48. flexible, and they can be forced to be shown in some convenient places 
  49. on the screen. Moreover, user can move them across the screen to be 
  50. able to see different parts of the covered windows.
  51.  
  52. Stdemo Player allows you even to play WAV files in order to make your
  53. tutorial better.
  54.  
  55. Even if you are not interested in preparing demos, you may find Stdemo 
  56. Player useful. For example, you can replace your complete Startup Group 
  57. with the single Stdemo Player script which will launch all your "startup" 
  58. applications, and even perform some initial actions for every of them: 
  59. set up default options, load files, etc.
  60.  
  61. Another feature allows you to automate your everyday chores (like backup, 
  62. etc. ) by using the sheduling abilities of Stdemo Player script language.
  63.  
  64. How to play the script?
  65. ======================
  66.  
  67. When you run stdemo.exe without parameters, it looks for the file 
  68. "script.txt" in the current working directory, and if it is there - 
  69. "plays" it. 
  70.  
  71. Also you may pass the name of the script as a parameter to stdemo.exe. 
  72. This name may include the full path.
  73.  
  74.  
  75. How to write a script?
  76. ======================
  77.  
  78. Script is a plain ASCII text file. It may include:
  79.  
  80. -    keystrokes;
  81. -    commands;
  82. -    interaction breaks;
  83. -    comments.
  84.  
  85. Every keystroke, command or interaction break is a unit. Stdemo Player 
  86. reads units from the script one by one and executes them. After one 
  87. unit is executed, Stdemo Player waits for some time (time-out tick, 
  88. which can be set or changed at any point in the script) and then 
  89. executes the next unit. Time-out doesn't affect the interaction breaks 
  90. (which are "text", "menu" and "input" dialog boxes). Once one of this 
  91. boxes is shown - only user may continue or stop script execution, 
  92. selecting "Continue" or "Stop" button on the box. 
  93. ( See below how to program "auto-continue" for interaction breaks.)
  94.  
  95. Comments are ignored, as you may expect, and cause no time-out delays.
  96.  
  97. 1. Keystrokes.
  98. --------------
  99.  
  100. Any text in the script which is not a command, interaction break or 
  101. comment is a set of keystrokes, i.e. every symbol of the text causes a 
  102. keystroke to be sent into the current window application (see  below).
  103. There are also several special symbols which allow to simulate 
  104. different keyboard keys.
  105.  
  106. Any keystroke can be preceded by one or more special symbols 
  107. ("@" - Alt, "#" - Shift or/and "%" - Control) as you see in the 
  108. following example:
  109.  
  110. @A    Alt-A
  111. #A    Shift-A
  112. %A    Ctrl-A
  113. #%A    Shift-Ctrl-A
  114.  
  115. There are also many special keys which are coded by "escaping" them 
  116. with the "]". They are follows:
  117.  
  118. ]|    Down
  119. ]^    Up
  120. ]<    Left
  121. ]>    Right
  122. ]~    Tab
  123. ]!    Return
  124. ]-    PgUp
  125. ]+    PgDn
  126. ]\    Backspace
  127. ]Z    Esc
  128. ]I    Ins
  129. ]D    Del
  130. ]H    Home
  131. ]E    End
  132. ]0    F10
  133. ]1    F1
  134. ...........
  135. ]9    F9
  136. ]]    ]
  137. ]@    @
  138. ]%    %
  139. ]#    #
  140. ]:    :
  141. ]$    $
  142.  
  143. This is not a full set of the keyboard keys, as you may note - but it 
  144. covers most of usable ones (I hope).
  145.  
  146. 2. Commands.
  147. ------------
  148.            
  149. All commands start from the colon sign ":". Some of the commands must 
  150. be coded as a separate line in a script, others can be mixed with the 
  151. keystrokes. The rule of a thumb is: if a command has fixed format or 
  152. ends with the special separator - it can be placed anywhere, otherwise 
  153. it has to be coded as a separate line of the script. The general format 
  154. of a command is:
  155.     :<code><parameters>
  156. <code> is a single letter or some other symbol;
  157. <parameters> may vary; one parameter can be a letter, text or number; 
  158. parameters follow the code without blank, and in some cases are 
  159. separated one from another by the special separator "|".
  160.  
  161.  
  162.  
  163. ATTENTION: I strongly recommend to use ":C11" and ":I11" commands at
  164.            the beginning of your script, and remove them only after
  165.            your script will be debuged and tested. Otherwise you are
  166.            risking to lock up your system.
  167.            
  168.  
  169. The commands are:
  170.  
  171. :Iab        enable/disable Windows input;
  172.             parameter "a" must be coded as one digit:
  173.             0 - disable input, 1 - enable input;
  174.             parameter "b" is also 1 digit:
  175.             0 - temporarily, 1 - permanently.
  176.     
  177.     Example:
  178.     :I10    enable input until the next interaction break.
  179.  
  180.     Note:    
  181.         When Stdemo starts, it disables Windows input
  182.         (keyboard and mouse buttons) in order to prevent
  183.         user's intervention into the actions being played.
  184.         When one of the interaction breaks occurs, the input
  185.         is partially restored to allow user interaction 
  186.         inside the dialog box only. When script continues,
  187.         the state is restored as it was before the break.
  188.         "Temporarily change the state of Windows input" means
  189.         "until the next interaction break occurs". Permanent
  190.         change affects all subsequent script play and can be 
  191.         changed with the next ":I" command only.
  192.  
  193. :Cab        show/hide Windows cursor;
  194.             parameter "a" must be coded as one digit:
  195.             0 - hide cursor, 1 - show cursor;
  196.             parameter "b" is also 1 digit:
  197.             0 - temporarily, 1 - permanently.
  198.     
  199.     Example:
  200.     :C11    show Windows cursor until further ":C" command.
  201.  
  202.  
  203.     Note:    
  204.         When Stdemo starts, it hides Windows cursor.
  205.         When one of the interaction breaks occurs, the cursor
  206.         is restored to allow user interaction inside the
  207.         dialog box only. When script continues, the state is
  208.         restored as it was before the break.
  209.         "Temporarily change the visibility of cursor" means
  210.         "until the next interaction break occurs". Permanent
  211.         change affects all subsequent script play and can be 
  212.         changed with the next ":C" command only.
  213.  
  214. :=x            set time-out tick to x milliseconds.
  215.             Default time-out is 1 millisecond.
  216.  
  217.     Example:
  218.     :=1000    set time-out tick to 1 sec.
  219.  
  220. :T            skip 1 time-out tick.
  221.  
  222.     Example:
  223.     abc:T:T:Tefg    enter "abc", then wait for three 
  224.             current time-out ticks, then enter
  225.             "efg".
  226.  
  227. :Wx            delay script execution for x seconds
  228.  
  229. :Dtext        change current directory to "text". 
  230.  
  231.     Example:
  232.     :Dc:\windows\system
  233.  
  234. :(program_name parm|x    
  235.             launch the application;
  236.             program name must include extension (for the 
  237.             security reason) and may include the full path;
  238.             parameters to the program can be passed, if 
  239.             needed (not required);
  240.             flag x may be coded as one digit 0..2 after the 
  241.             separator and affects the size of the
  242.             application window: 0 (default), 1(maximize),
  243.             2(minimize).
  244.         
  245.         Note:
  246.             By deafult, Stdemo checks if the application
  247.             created active window, and if not - assumes
  248.             that something went wrong. This might create 
  249.             problems if the application you are going to start
  250.             doesn't create window at all, or creates a hidden
  251.             window. See :c command below which disables this check.
  252.     
  253.     Examples:
  254.     :(notepad.exe
  255.     :(c:\windows\write.exe demo.wri
  256.     :(notepad.exe c:\stdemo\readme.txt|2
  257.  
  258. :cX            enable/disable check on active window after the :( command;
  259.             parameter "X" must be coded as one digit:
  260.             0 - disable check, 1 - enable check.
  261.  
  262. :<caption string|x    find and activate/hide/destroy already running 
  263.             application;
  264.             flag x may be coded as one digit 0..4 after the 
  265.             separator and affects the size of the
  266.             application window: 0 (default), 1(maximize),
  267.             2(minimize), 3(hide), 4(destroy).
  268.     Note:    
  269.         If the last symbol of <caption string> is "*" - 
  270.         it is treated as a "wildcard", i.e. any window with
  271.         the caption which matches the "wildcarded" search string 
  272.         fits the search condition.
  273.  
  274.     Examples:
  275.     :<Notepad - (Untitled)|1
  276.     :<Notepad*|2
  277.  
  278. :)            kill the last application in stack (if exists).
  279.  
  280.     Note:    
  281.         Stdemo Player allows to start several applications.
  282.         It keeps track of the applications being started in 
  283.         the internal stack ( max. 50 entries). When you start
  284.         a new application, the following keystrokes will be 
  285.         sent into the new application window, as it will
  286.         get focus after the launch. You must issue ":)" -
  287.         kill last application - command, even when you finish
  288.         the application using it's menu commands - so that
  289.         Stdemo Player could handle the stack of current
  290.         applications properly.
  291.         You can switch focus from one application to another
  292.         using :< command or you can do this by simulating mouse 
  293.         clicking in the proper window. Just    make sure that you 
  294.         close applications in the reverse order as you started 
  295.         them, and issue correspondent ":)" commands in the same 
  296.         reverse order.
  297.         
  298. :Ltext            assign the label "text" to the current point in
  299.                 the script.
  300.  
  301.     Note:
  302.         Script will jump to the special label "__STOP__" when 
  303.         STOP button pressed on any interaction break box. 
  304.         If there is no such label in the script - STOP will cause 
  305.         just usual termination.
  306.  
  307. :Gtext            goto label "text".
  308.  
  309.     Note:     
  310.         these two commands apparently do not require
  311.         explanation. Just note that so far there is no
  312.         conditional "goto" command (except of :?). You can
  313.         use ":G" command to code the loop, or to skip part of the
  314.         script during debugging. Labels are required when
  315.         you program a "menu" interaction break (see below).
  316.  
  317. :$ntext        set variable n to "text" (n=0..9).
  318.     
  319.     Example:
  320.     :$1Hello 
  321.     :$2, how are you?
  322.  
  323.     Note:    
  324.         variables can be used among the keystrokes, i.e., 
  325.         using previous example, script "$1 Joe$2" will
  326.         play "Hello Joe, how are you?". Variables are 
  327.         extensively used in the "input" interaction breaks
  328.         (see below).
  329.  
  330.  
  331. :+x            set interaction breaks' time-out tick to x seconds.
  332.             Default time-out is 0. (Maximum is 65 seconds).
  333.     
  334.     Example:
  335.     :+10    set interaction breaks' time-out tick to 10 sec.
  336.  
  337.     Note:    The :+x command allows to set the special timer which will affect
  338.             execution of interaction breakes (TEXT, MENU and INPUT). Setting the value
  339.             of this timer somewhere in a script means that for all subsequent
  340.             communication breaks (dialog boxes) the "continue" button 
  341.             will be "pressed" automatically after x seconds since
  342.             this dialog box was initially shown. :+0 disables this feature. 
  343.  
  344. :Ra        disable/enable 3-D effect for interaction breaks.
  345.             parameter "a" must be coded as one digit:
  346.             0 - disable 3-D, 1 - enable 3-D.
  347.  
  348. :Xa        disable/enable/show/hide the "Stop" button on interaction breaks
  349.             parameter "a" must be coded as one digit:
  350.             0 - hide "Stop" button, 1 - disable "Stop" button, 
  351.             2 - enable "Stop" button.
  352.  
  353. :Ya        disable/enable/show/hide the "Continue" button on interaction breaks
  354.             parameter "a" must be coded as one digit:
  355.             0 - hide "Continue" button, 1 - disable "Continue" button, 
  356.             2 - enable "Continue" button.
  357.  
  358. :Fx        set the minimal point sizes for the font; 
  359.             parameter "x" must be coded as a number and represents the
  360.             minimal point sizes for the font which is used when all
  361.             text doesn't fit into a text box. If it
  362.                is impossible to fit all text using the font bigger than
  363.                minimal - the defaul font will be used with the scrollbar
  364.                enabled. See also :d command to set up the default font size.
  365.                (Default is :F8).
  366.  
  367. :dx        command sets the default size for the font (in point sizes); 
  368.             parameter "x" must be coded as a number and represents the
  369.             default point sizes for the font which is used for the text 
  370.             show in a text dialog box. See also the :F command to set
  371.             up the minimal size of the font. (Default is :d8).
  372.  
  373. :bx        command allows to change the background color for text,
  374.             menu and input fields;
  375.             parameter "x" must be coded as a number and represents the
  376.             index of the color in system palette;
  377.             (default is blue - :b18).
  378.  
  379. :fx        command allows to change the foreground color for text,
  380.             menu and input fields;
  381.             parameter "x" must be coded as a number and represents the
  382.             index of the color in system palette;
  383.             (default is black - :f0).
  384.  
  385. :p<filename>|f    play the WAV file 
  386.             flag f may be coded as one digit 0..3 after the 
  387.             separator and affects the mode in which sound file is played:
  388.             0 (default) - synchronous mode;
  389.             1 - asyncronous mode (StDemo continues to run the following
  390.                 script commands not waiting for sound to finish;
  391.             2 - loop mode -- the sound will continue to play repeatedly until
  392.                 another :p command is executed;
  393.             3 - stop the currently playing sound (the <filename> is ignored
  394.                 for this mode, i.e. you may code the command as ":p|3").
  395.  
  396. :Alabel|m|h|w|d|t    command allows to create "cron"-like scheduling
  397.             of script execution. It triggers "goto label" operation if
  398.             parameters match current date and time. Parameter are treated
  399.             as: m - minutes (0 - 59), h - hours (0 - 23), w - day of
  400.             week (1-7), d - day of a month (1-31), t - month (1-12).
  401.             All parameters also can be coded as * ( any).
  402.             If parameters do not match current day/time - the next command
  403.             in a script will be executed.
  404.             
  405.     Example:
  406.     :AReminder|30|9|*|9|8    goto label "Reminder" if today is August 9, 9:30am 
  407.     :ADump|00|22|*|*|*        goto label "Dump" on any day 10:00pm 
  408.  
  409.     :ASave|00|*|*|*|*        goto label "Save" every 10 minutes
  410.     :ASave|10|*|*|*|*
  411.     :ASave|20|*|*|*|*
  412.     :ASave|30|*|*|*|*
  413.     :ASave|40|*|*|*|*
  414.     :ASave|50|*|*|*|*
  415.  
  416.     Note:     
  417.         1. Once :A command is executed - StDemo forgets about it. There
  418.            is no internal loop in StDemo in order to check if current
  419.            date/time matches some :A commands. It means that you have to
  420.            provide your own loop inside a script if you are going to
  421.            check this conditions repeatedly.
  422.  
  423.         2. Be careful when after the successful execution of :A command
  424.            you switch control back to the loop: if the same :A command
  425.            will be executed again and conditions will match again - it
  426.            might execute your code again several times (when you expect
  427.            it to be run only once).
  428.                 Example:
  429.                     // main loop
  430.                     :Start
  431.                     :=1000
  432.                     :ASave|00|*|*|*|*
  433.                     :GStart    
  434.                     //
  435.                     // subroutine to execute "Save"
  436.                     :LSave        (1)
  437.                     .................
  438.                     :GStart       (2)
  439.         
  440.            If you mean this script to execute "Save" once every hour - 
  441.            your results will depend on how long will it take to execute
  442.            "save" subroutine. If it takes less than minute - next time
  443.            :A will be executed it might branch to :LSave again. You may
  444.            solve this problem by applying proper timing (use :=, :T, :U  
  445.            or :W commands) but the best solution is to use :~ command with
  446.            the same date/time pattern which initiated your scheduled
  447.            subroutine (look below).
  448.  
  449. :Um|h|w|d|t    command simplifies scheduling in some simple cases, it accepts
  450.             the same parameters as :A command (except of label) and simply
  451.             waits till current date/time will match given parameters. Be 
  452.             careful, do not program infinite (or almost) loops.
  453.         
  454. :~m|h|w|d|t    command has the same parameters as :U command and allows you
  455.             to wait till current date/time will NOT match given parameters.
  456.             The best use of this command is at the end of the scheduled
  457.             subroutine (see :A above).
  458.  
  459.             Example:
  460.  
  461.                     :C11
  462.                     :I11
  463.                     :=1000
  464.                     // Main loop
  465.                     :Start
  466.                     :=1000
  467.                     :ABackup|0|4|*|*|*
  468.                     :ACloseBackup|0|7|*|*|*
  469.                     :ASendFax|30|16|*|*|*
  470.                     :ACloseFax|50|16|*|*|*
  471.                     // In case we want to terminate Stdemo Player at this time                    
  472.                     :ATerminate|00|18|*|*|*
  473.                     :GStart    
  474.                     // Backup subroutine
  475.                     :LBackup
  476.                     :DC:\backup
  477.                     :(backup.exe
  478.                     //..........
  479.                     // send proper keystrokes to initiate backup
  480.                     //..........
  481.                     :~0|4|*|*|*
  482.                     :GStart    
  483.                     // Send fax subroutine
  484.                     :LSendFax
  485.                     :DC:\winword
  486.                     :(winword.exe report.doc
  487.                     //..........
  488.                     // send proper keystrokes to initiate fax
  489.                     //..........
  490.                     :~30|16|*|*|*
  491.                     :GStart    
  492.                     :LCloseBackup
  493.                     :<Backup
  494.                     //..........
  495.                     // send proper keystrokes to close backup window
  496.                     //..........
  497.                     :~0|7|*|*|*
  498.                     :GStart    
  499.                     :LCloseFax
  500.                     :<Microsoft Word - REPORT.DOC
  501.                     //..........
  502.                     // send proper keystrokes to close winword window
  503.                     //..........
  504.                     :~50|16|*|*|*
  505.                     :GStart                                         
  506.                     // Termination
  507.                     :LTerminate
  508.                     :Z
  509.                     
  510. :Z        terminate script execution
  511.  
  512. :Va|b|c|d    conditional branch depending on current screen resolution:
  513.             a - label for the 640x480 resolution
  514.             b - label for the 800x600 resolution
  515.             c - label for the 1024x768 resolution
  516.             d - label for the 1280x1024 resolution
  517.             
  518.     Example:
  519.         :VP640|P800|P1024|P1280
  520.         :Z
  521.         :LP640
  522.         :#S
  523.         Resolution is 640x480
  524.         #                                                  
  525.         :Z
  526.         :LP800
  527.         :#S
  528.         Resolution is 800x600
  529.         #                                                  
  530.         :Z
  531.         :LP1024
  532.         :#S
  533.         Resolution is 1024x768
  534.         #                                                  
  535.         :Z
  536.         :LP1280
  537.         :#S
  538.         Resolution is 1280x1024
  539.         #                                                  
  540.         :Z
  541.  
  542. :?caption string|label    branch to the label if window with the given
  543.             caption string exists;
  544.     Note:    
  545.         If the last symbol of <caption string> is "*" - 
  546.         it is treated as a "wildcard", i.e. any window with
  547.         the caption which matches the "wildcarded" search string 
  548.         fits the search condition.
  549.  
  550.     Examples:
  551.     :?Notepad - (Untitled)|FOUND_NOTEPAD
  552.     :?Notepad*|found
  553.  
  554.  
  555. The following commands are to be used when you want some mouse actions 
  556. to be played from your script. It is not always possible to get a 
  557. reliable results with the mouse actions, assuming that your script can 
  558. be played with different display drivers in different Windows modes and 
  559. display resolutions. In order to cope with this, you must use "virtual" 
  560. coordinates, i.e. before using any command which has coordinates as a 
  561. parameter, you have to set "virtual screen/window size" and then all 
  562. following coordinates must be coded according to this size. When your 
  563. script will be played, Stdemo Player will determine the real current 
  564. screen/window size, and then adjust all your virtual coordinates 
  565. according to virtual/real ratio. You have to understand, that it is not 
  566. a perfect solution - for example, dialog boxes sizes are not 
  567. proportionally changed for different display resolutions, they depend 
  568. on the size of the system font rather than on display mode. But if you 
  569. code your mouse actions inside the dialog box, based on the dialog box 
  570. virtual size - it will work. 
  571. You may sometimes need to use absolute coordinates instead of relative,
  572. define this in the :O command.
  573.  
  574. :Sx|y            set virtual screen/window size.
  575.     
  576.     Example:
  577.     :S1024|768
  578.     :S100|50
  579.  
  580. :Oabc            set coordinates origin.
  581.             parameter "a" must be coded as one letter:
  582.                 S - screen, A - application main window,
  583.                 F - current focus window;
  584.             parameter "b" is also 1 letter:
  585.                 C - client area, W - window area.
  586.             parameter "c" is also 1 letter:
  587.                 V - virtual coordinates (default), 
  588.                 A - absolute coordinates.
  589.     
  590.     Examples:
  591.     :OSWV
  592.     :OACA
  593.     :OFW
  594.  
  595. :Mx|y|n        move mouse cursor to (x,y) in n steps.
  596.  
  597.     Examples:
  598.     :S200|200
  599.     :OAC
  600.     :C11
  601.     :M100|100|1    set cursor in the center of the client area
  602.             of the main application window.
  603.     :M0|200|100    move cursor in 100 steps to the bottom-left
  604.             corner of the client area.
  605.  
  606.     Note:    Make sure that your coordinates agree with the
  607.         current modes set in ":S" and ":O" commands.
  608.  
  609. :Bab        mouse button action.
  610.             parameter "a" must be coded as one letter:
  611.             L - left button, R - right button, M - middle;
  612.             parameter "b" must be coded as 1 digit:
  613.             1 - press, 0 - release, 2 - double-click. 
  614.         
  615.         Note: This command affects only client-area of a
  616.               window. You cannot simulate mouse-clicks in
  617.               non-client area using this command.
  618.  
  619. :Kab        set keyboard state for some special keys.     
  620.     
  621.             parameter "a" must be coded as one letter:
  622.             S - Shift key, C - Control key, A - Alt key, I - Ins key;
  623.             parameter "b" must be coded as 1 digit:
  624.             1 - down, 0 - up.
  625.  
  626.     Example:
  627.     :KS1:BL1:BL0:KS0    click the left mouse button when the
  628.                 Shift key is down.
  629.  
  630.  
  631. 3. Interaction breaks.
  632. ----------------------
  633.  
  634. These are various dialog boxes which can be shown at any point of you 
  635. script, allowing therefore some interaction with user. There are three 
  636. classes of these boxes: "text", "menu" and "input". Each class contains 
  637. from 3 to 5 similar boxes, which vary by their size and by the number 
  638. of fields in them.
  639. All boxes are coded in the script differently, but the common pattern 
  640. is:
  641.  
  642. <header line>
  643. <one or more body lines>
  644. <end-of-box delimiter line>
  645.  
  646. 3.1 TEXT interaction break.
  647. +++++++++++++++++++++++++++
  648.  
  649. Every TEXT box has a single text field which fills the dominant area of 
  650. the box.
  651.  
  652. The header line is:
  653. :#sxy
  654.     parameter "s" defines the size and must be a letter:
  655.     S - small, M - medium, L - large, W - wide, N - narrow;
  656.     parameter x defines the position along the x-axis:
  657.     L - left adjusted, C - centered, R - right adjusted;
  658.     parameter y defines the position along the y-axis:
  659.     U - up adjusted, C - centered, D - down adjusted.
  660.  
  661. The body of this break consists from the text only, which will be shown 
  662. in the single text field of the box. Text may be coded as one or more 
  663. lines in the script, but it'll be placed continuously in the box, 
  664. applying word wrap. There are two special commands which can be entered 
  665. into the body of the TEXT box:
  666. .N    causes the following text start from a new line in a box;
  667. .S    causes to skip one line and continue to fill a box with the
  668.     following text.
  669.  
  670. The delimiter line is:
  671. #
  672.  
  673. Example:
  674.  
  675. :#NCC
  676. This is the narrow box, centered on the screen.
  677. .S
  678. This text starts after the empty line.
  679. .N
  680. This text starts from the beginning of the new line.
  681. #
  682.  
  683. Notes:        1. The amount of text you can place into the text box 
  684.            depends on the current display mode ( VGA, SVGA,     
  685.            etc. ) and fonts supported by your current display 
  686.            driver. This creates a problem: the text you placed 
  687.            into the box might not fit when you run your demo on 
  688.            a different system. In order to make sure, that it 
  689.            will not happen, Stdemo Player checks if the whole 
  690.            text fits into the box, and if not - it is trying to 
  691.            reduce the font size, until the whole text fits. If 
  692.            the system doesn't have a small enough font - the     
  693.            scroll bar will be added to the text field, so that 
  694.            user can read the whole text by scrolling it.
  695.  
  696.  
  697. 3.2 MENU interaction break.
  698. +++++++++++++++++++++++++++
  699.  
  700. Every MENU box has a header text field on a top and from 2 to 9 menu 
  701. item fields ( radio buttons).
  702.  
  703. The header line is:
  704. :*sxy
  705.     parameter "s" defines the size and must be a letter:
  706.     S - small, M - medium, L - large;
  707.     parameter x defines the position along the x-axis:
  708.     L - left adjusted, C - centered, R - right adjusted;
  709.     parameter y defines the position along the y-axis:
  710.     U - up adjusted, C - centered, D - down adjusted.
  711.  
  712. The body of this break consists from the text which will fill the 
  713. header text field of the menu box, and two or more menu lines. 
  714. Text may be coded as one or more lines anywhere in the body; it'll be 
  715. placed continuously in the header field, using word wrap if 
  716. appropriate. Text line should not start from a digit.
  717. Every menu item line has the following format:
  718.  
  719. nlabel|item text      
  720.  
  721. "n" is a menu item field number (1..9);
  722. "label" - is a label in the script where control will be passed if this 
  723. item will be selected from the menu box.
  724. "item text" is a text to fill the menu item field.
  725.  
  726. The delimiter line is:
  727. *
  728.  
  729. Notes:        1. The "small" menu box has 2 menu fields, the         
  730.            "medium" - 5 fields, and the large - 9 fields.
  731.         
  732.         2. If there is no text for the header - the header     
  733.            field will not be shown in the box.
  734.         
  735.         3. If there is no lines for some menu items - the     
  736.            correspondent item field will not be shown in the     
  737.            box.
  738. Example:
  739.  
  740. :*MCU
  741. Select one of the three:
  742. 1l1|This is the first item
  743. 3l2|This is the second item
  744. 5l3|This is the third item
  745. *
  746. :Ll1
  747. :#SCC
  748. You've selected the first.
  749. #
  750. :Gcont
  751. :Ll2
  752. :#SCC
  753. You've selected the second.
  754. #
  755. :Gcont
  756. :Ll3
  757. :#SCC
  758. You've selected the third.
  759. #
  760. :Lcont
  761.  
  762.  
  763. 3.3 INPUT interaction break.
  764. ++++++++++++++++++++++++++++
  765.  
  766. Every INPUT box has a header text field on a top of the box and from 1 
  767. to 9 edit fields. The small box has only one edit field, the medium has 
  768. 5, and the large has 9. Every edit field in the medium and large INPUT 
  769. boxes has the correspondent description field on a left of the every 
  770. edit field.
  771.  
  772. The header line is:
  773. :%sxy
  774.     parameter "s" defines the size and must be a letter:
  775.     S - small, M - medium, L - large;
  776.     parameter x defines the position along the x-axis:
  777.     L - left adjusted, C - centered, R - right adjusted;
  778.     parameter y defines the position along the y-axis:
  779.     U - up adjusted, C - centered, D - down adjusted.
  780.  
  781. The body of this break consists from the text which will fill the 
  782. header text field of the menu box, and one or more input lines. 
  783. Text may be coded as one or more lines anywhere in the body; it'll be 
  784. placed continuously in the header field, using word wrap if 
  785. appropriate. Text line should not start from a digit.
  786. Every input line has the following format:
  787.  
  788. nDescription_Text      
  789.  
  790. "n" is a input field number (1..9); the correspondent input field will 
  791. be filled with the current value of the variable $n. If the variable is 
  792. empty - the field will also be empty.
  793.  
  794. "Description_Text" is a text to fill the description field for the "n"-
  795. th input field.
  796.  
  797. The delimiter line is:
  798. %
  799.  
  800. Notes:    1. The "small" input box has 1 edit field, the         
  801.            "medium" - 5 fields, and the large - 9 fields.
  802.         
  803.         2. If there is no text for the header - the header     
  804.            field will not be shown in the box.
  805.         
  806.         3. If there is no line for some edit field - the     
  807.            correspondent edit and description fields will not
  808.            be shown in the box.
  809.  
  810.         4. After user entered some text in the input field -       
  811.            this text will be assigned to the correspondent     
  812.            variable ($1..$9).
  813. Example:
  814.  
  815. :(notepad.exe|1
  816. :$2John
  817. :%MCU
  818. Please correct your name.
  819. 2Your first name:
  820. 4Your last name:
  821. %
  822. Hello, $2 $4!
  823. :#SRD
  824. Is my greeting correct?
  825. #
  826. :)
  827.  
  828.  
  829. 4. Comments.
  830. ------------
  831.  
  832. Any line in the script outside the interaction breaks, which starts 
  833. from "//" is being treated as a comment.
  834.  
  835.  
  836. Known Problems.
  837. ===============
  838.  
  839. StDemo might misbehave if it is running together with
  840. ALL3D package which forces all dialog boxes to have
  841. 3-D look provided by CTL3D.DLL
  842.  
  843. Script.txt runs up to 2 instances of Paintbrush, which
  844. eat a lot of memory from the system heap. Make sure you have
  845. sufficient amount of virtual memory available.
  846.  
  847.  
  848. Future.
  849. =======
  850.  
  851. I'm sure you noticed that the program can be further extended
  852. ( for example, auto recorder would not do any harm ). Please,
  853. share your ideas with me, if you are interested.
  854.  
  855. Acknowledgments.
  856. ================
  857.  
  858. 1. Thanks to CompuServe and all participants of the WinSdk
  859.    forum - you were my teachers, when I started programming
  860.    Windows.
  861.  
  862. 2. Thanks to Brent Rector, whose book "Developing Windows 3
  863.    Applications" (and once he personally) helped me along
  864.    my way of learning Windows.
  865.  
  866. 3. Thanks to my employers and friends Ken Winston and Michael
  867.    Markov; their enthusiasm kept me busy enough to grow.
  868.  
  869. Registration.
  870. ============
  871.  
  872. Stdemo Player is shareware.
  873.  
  874. The registration of a single licence will entitle you to use ONE 
  875. copy of Stdemo Player. Read about the Pro version in "addon.txt".
  876. Site licence allows to redistribute StDemo run-time royalty free.
  877.  
  878. -----------------------------------------------------------------
  879.              |                    V E R S I O N
  880. -----------------------------------------------------------------
  881. Licence      |        Standard (w/src)   |  Professional (w/src)
  882. -----------------------------------------------------------------
  883. Single       |        $30                   $60
  884. Site         |        $300     ($600)       $500         ($900)
  885. -----------------------------------------------------------------
  886.  
  887.  
  888. To register by mail, please send check or money order to:
  889.  
  890. Mik Kvitchko
  891. 37 Landsdowne Rd,
  892. East Brunswick, NJ 08816
  893. USA
  894.  
  895. To register on CompuServe, GO SWREG and find StDemo 
  896. (registration ID is 3276)
  897.  
  898. The price to register on CompuServe is higher to cover CompuServe's
  899. charges: $35 for a single license and the rest accordingly.
  900. To register Pro or site licence on CompuServe, simply register several
  901. copies according to the following table:
  902. -----------------------------------------------------------------
  903.              |                    V E R S I O N
  904. -----------------------------------------------------------------
  905. Licence      |        Standard (w/src)   |  Professional (w/src)
  906. -----------------------------------------------------------------
  907. Single       |        1 copy                  2 copies
  908. Site         |        10 copies(20 copies)    16 copies  (30 copies)
  909. -----------------------------------------------------------------
  910.  
  911. Then let me know by CompuServe mail what kind of registration is that.
  912.  
  913. When you register, I will replace irrelevant "MIK" icon on all dialog 
  914. boxes to another one (you may send your icon to me), remove "UNREGISTERED"
  915. stamp from these dialog boxes and will send the updated copy to you. 
  916.  
  917. Comments? Questions? Suggestions? 
  918. I will be glad if you contact me at:
  919.  
  920. Internet:    mik@cnj.digex.com
  921. CompuServe: [74127,3671]
  922.  
  923. You can make copies of this program and give them to others as long as 
  924. all files are included and unaltered.
  925.  
  926.  
  927. Disclaimer.
  928. ===========
  929. I've taken great care to ensure the program performs as stated. Still, 
  930. I cannot guarantee this will be the case on every system. As such, you 
  931. agree NOT to hold me responsible for ANY damages directly or indirectly 
  932. related to the use of Stdemo Player. The author of this software is not 
  933. responsible for any damage due to use of this program.  This software 
  934. is provided without warrantee of any kind.
  935.  
  936. A Personal Note...
  937. ==================
  938.  
  939. I write C better than English. Please excuse my mistakes and funny 
  940. constructions in the above text, if you noted some (I'm sure, you 
  941. did!). Especially articles... They are incomprehensible!
  942.  
  943. Thanks!
  944.